package commons.interceptor.config;

import commons.interceptor.PermsInterceptor;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import javax.annotation.Resource;

/**
 * @Author: yangtao
 * @date 2021/8/6 10:28
 * @Version 1.0
 */
@Configuration
public class PermsinterceptorConfiguration implements WebMvcConfigurer {
    @Resource
    private PermsInterceptor permsInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(permsInterceptor).addPathPatterns("/**");
    }
}
